<!-- 提现记录 -->
<template>
  <van-nav-bar
    left-arrow
    :title="$t('notic.title')"
    @click-left="router.back()"
  >
  </van-nav-bar>
  <div class="detail">
    <div class="detail-content">
      <van-cell
        :title="data.noticeTitle"
        size="large"
        :label="data.createTime"
      />
      <!-- <van-divider /> -->
      <div class="detail-text" v-html="data.noticeContent"></div>
    </div>
  </div>
</template>
<script setup>
import { reactive } from "@vue/reactivity";
import { useRouter, useRoute } from "vue-router";
import { useI18n } from "vue-i18n";
import { noticedetail, readnoticedetail } from "@/api/home";
import { onMounted } from "vue";
const { t } = useI18n();
const router = useRouter();
const route = useRoute();
let data = reactive({
  noticeTitle: "",
  createTime: "",
  noticeContent: "",
});
onMounted(async () => {
  let res = await noticedetail(route.query.noticeId).catch((err) => {
    console.log(err);
  });
  await readnoticedetail(route.query.noticeId);
  Object.assign(data, res.data);
  console.log(res);
});
</script>
<style lang="less">
.detail {
  height: calc(100% - 77px);
  background: #f6f6f6;
  padding: 15px;
  &-content {
    width: 100%;
    height: 100%;
    overflow: auto;
    background: white;
  }
  .detail-text {
    padding: 20px;
    font-size: 14px;
    font-family: PingFang SC;
    font-weight: 500;
    color: #333333;
    word-wrap: break-word;
  }
  .van-cell__title span {
    font-size: 16px;
    font-family: PingFang SC;
    font-weight: bold;
    color: #333333;
  }
  .van-cell__title .van-cell__label {
    font-size: 12px;
    font-family: PingFang SC;
    font-weight: 500;
    color: #999999;
  }
  :deep(.van-cell:after) {
    border-bottom: 1px solid #e6e6e6 !important;
  }
}
</style>
